//package y.q.h.util;
//
//import org.apache.log4j.Logger;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import y.q.h.model.AdminLog;
//import y.q.h.model.ApiExamine;
//import y.q.h.model.TomallStatusRecord;
//import y.q.h.service.AdminLogService;
//import y.q.h.service.ApiExamineService;
//import y.q.h.service.TomallStatusRecordService;
//
//import javax.servlet.http.HttpServletRequest;
//import java.text.SimpleDateFormat;
//@Component
//public class TomallResouceUpload {
//	@Autowired
//	private AdminLogService adminLogService;
//	@Autowired
//	private TomallStatusRecordService tomallStatusRecordService;
//	@Autowired
//	private ApiExamineService apiExamineService;
//	Logger logger=Logger.getLogger(TomallResouceUpload.class);
//	public  void submitResouceUpload(TomallStatusRecord tomallStatusRecord,HttpServletRequest request,AdminLog adminLog){
//		System.err.println("+++++++++++submitResouceUpload+++++++++++++++++++");
//		final String startYearm=new SimpleDateFormat("yyyy").format(tomallStatusRecord.getCreattime());
//		final String path=request.getSession().getServletContext().getRealPath("/");
//		tomallStatusRecord=tomallStatusRecordService.queryTomallStatusRecordFromOrderId(tomallStatusRecord.getOrderId(), startYearm);
//
//		try {
//			ApiExamine apiExamine=apiExamineService.queryApiExamine(1);
//			if(apiExamine.getExamine()==1){
//				System.err.println(Tools.getValue(path, "submitTomallUrl")+"==============================");
//						// TODO Auto-generated method stub
//						Tools.sendPostKey(Tools.getValue(path, "submitTomallUrl"), "tId="+tomallStatusRecord.getId()+"&path="+path+"&startYearm="+startYearm);
//			}else{
//
//				tomallStatusRecordService.updateTomallStatusRecord(startYearm,tomallStatusRecord.getId(), 2, "审核");
//			}
//			if(adminLog!=null){
//				adminLog.setStatus(13);
//				adminLog.setDetail("提单订单ID:"+tomallStatusRecord.getId());
//				adminLogService.addAdminLog(adminLog);
//			}
//		} catch (Exception e) {
//			tomallStatusRecordService.updateTomallStatusRecord(startYearm,tomallStatusRecord.getId(), 5, e.getMessage());
//
//			e.printStackTrace();
//			logger.error("提交订单号卡错误", e);
//		}
//
//	}
//
//
//
//
//}
